package com.petalsgroup.petals.dao.collect.impl;

import com.petalsgroup.petals.dao.collect.CollectDao;
import com.petalsgroup.petals.util.JDBCUtils;
import org.springframework.jdbc.core.JdbcTemplate;

public class CollectDaoImpl implements CollectDao {
    private JdbcTemplate jdbcTemplate = new JdbcTemplate(JDBCUtils.getDataSource());

    @Override
    public int deleteCollectByAid(int aid) {
        String sql = "delete from comments where aid = ?";
        return jdbcTemplate.update(sql, aid);
    }
}
